package com.wwdx.controller.admin;

import com.wwdx.controller.base.BaseController;
import com.wwdx.model.WwdxCdKeyModel;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author liguoliang
 * @date 2017-11-03 9:41
 */
@Controller
@RequestMapping("/system/wwdx_cdkey")
public class WwdxCdKeyController extends BaseController{

    /**
     * 兑换码列表
     */
    @RequestMapping("/list")
    public ModelAndView list(WwdxCdKeyModel model,
                             @RequestParam(value = "page",defaultValue = "1")Integer page,
                             @RequestParam(value = "rows",defaultValue = "10")Integer rows){

        ModelAndView mv = new ModelAndView();
        mv.addObject("model",model);
        mv.addObject("listSize",wwdxCdKeyService.selectModelCount(model));
        mv.addObject("list",wwdxCdKeyService.selectModelList(model,page,rows));
        return mv;
    }
}